load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

cc_library(
    name = "urdfdom",
    hdrs = [
        "urdf_parser/include/urdf_parser/exportdecl.h",
        "urdf_parser/include/urdf_parser/urdf_parser.h",
    ],
    srcs = [
        "urdf_parser/src/joint.cpp",
        "urdf_parser/src/link.cpp",
        "urdf_parser/src/model.cpp",
        "urdf_parser/src/pose.cpp",
        "urdf_parser/src/twist.cpp",
        "urdf_parser/src/urdf_model_state.cpp",
        "urdf_parser/src/urdf_sensor.cpp",
        "urdf_parser/src/world.cpp",
    ],
    deps = [
        "@urdfdom_headers",
        "@tinyxml",
        "@console_bridge",
    ],
    includes = ["urdf_parser/include"],
    visibility = ["//visibility:public"],
)

cc_binary(
    name = "check_urdf",
    srcs = [
        "urdf_parser/src/check_urdf.cpp",
    ],
    deps = [
        ":urdfdom",
    ],
    visibility = ["//visibility:public"],
)

cc_binary(
    name = "urdf_to_graphiz",
    srcs = [
        "urdf_parser/src/urdf_to_graphiz.cpp",
    ],
    deps = [
        ":urdfdom",
    ],
    visibility = ["//visibility:public"],
)
